package fr.micouz.gwt.dispatch.client;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;

import fr.micouz.gwt.dispatch.shared.MyResult;

public abstract class GotMyResult implements AsyncCallback<MyResult> {

	public void onFailure(Throwable caught) {
		Window.alert( "Error: " + caught.getMessage() );
	}

	public void onSuccess(MyResult myResult) {
		got(myResult);
	}
	
	public abstract void got(MyResult result);

}
